package main

import (
	"fmt"
	"regexp"
)

//正则
func main() {
	content := `[INFO][bko.loader][Thread-6][07:55:10]  FILE : 1-1. /home/sasis/bko/bkoFile/ZHBKO171109075001.txt.gz`
	fileNameExp := regexp.MustCompile(`ZHBKO.*\d`)           //以ZHBKO开头，数字结尾
	timeExp := regexp.MustCompile(`[\d]{2}:[\d]{2}:[\d]{2}`) //获取日期

	fileName := fileNameExp.FindString(content)
	starTime := timeExp.FindString(content)
	fmt.Printf("fileName is %s, Time is %s \n", fileName, starTime)
}
